package com.tanhua.app.exception;

import com.tanhua.model.vo.ErrorResult;

public class BusinessException extends RuntimeException {

    private ErrorResult errorResult;

    public BusinessException(ErrorResult errorResult) {
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }

    public BusinessException() {
    }

    /**
     * 获取
     * @return errorResult
     */
    public ErrorResult getErrorResult() {
        return errorResult;
    }

    /**
     * 设置
     * @param errorResult
     */
    public void setErrorResult(ErrorResult errorResult) {
        this.errorResult = errorResult;
    }

    public String toString() {
        return "BusinessException{errorResult = " + errorResult + "}";
    }
}